#!/usr/bin/env node

const fs=require('fs'),
      fileName=process.argv[2],
      log=console.log;
//混合方式打印文件内容
try{
  let fid=fs.openSync(fileName,'r'),
      buf;

  buf=fs.readFileSync(fid);
  log(buf.toString('utf8'));
  fs.closeSync(fid);
}catch(e){
  log(e.message);
}
